package manage.dao;

import m.common.dao.Dao;
import m.system.db.DBManager;
import m.system.db.DataRow;

import java.sql.SQLException;

public class AdminAssistDao extends Dao {

    /**
     * 根据用户名和密码获取oid
     */
    public String getUserOid(String adminOid,String username,String password) throws SQLException {
        DataRow dr= DBManager.queryFirstRow("select oid from os_admin_assist where admin_oid=? and username=? and password=?",adminOid,username,password);
        if(null!=dr){
            return dr.get(String.class,"oid");
        }else{
            return null;
        }
    }
}
